#include "formcharts.h"
#include "ui_formcharts.h"
#include <QtCharts/QChart>
#include <QtCharts/QLineSeries>
#include <QtCharts/QChartView>
#include"QVBoxLayout"
#include"QTimer"

FormCharts::FormCharts(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::FormCharts)
{
    ui->setupUi(this);

    QChart *chart = new QChart();
    QLineSeries *series = new QLineSeries();

    // Add data points to the series
    series->append(0, 6);
    series->append(2, 4);
    series->append(3, 8);
    series->append(7, 4);
    series->append(10, 5);

    // Add series to the chart
    chart->addSeries(series);
    QChartView *chartView = new QChartView(chart);
    chartView->setRenderHint(QPainter::Antialiasing);
    QTimer*timer=new QTimer();


    // Set up the layout
    QVBoxLayout *layout = new QVBoxLayout(this);
    layout->addWidget(chartView);
    setLayout(layout);

}

FormCharts::~FormCharts()
{
    delete ui;
}
